//
//  MyStatisticGraphicView.h
//  LearnObjectiveC
//
//  Created by 吴可高 on 16/6/6.
//  Copyright © 2016年 吴可高. All rights reserved.
//

#import <UIKit/UIKit.h>


#define kMargin_Left 20
#define kMargin_Top  20


@interface BrokenShapeLayer : CAShapeLayer
-(void)addAnimationKeyPath:(NSString*)keyPath
                 fromValue:(NSValue*)fromValue
                   toValue:(NSValue*)toValue
                  duration:(NSTimeInterval)timeInterval
                  delegate:(id)delegate;
@end

@class BrokenPointValue;
@interface MyStatisticGraphicView : UIView
@property (strong, nonatomic)NSArray <BrokenPointValue*>* items;
/// X、Y分区数量
@property (nonatomic, assign) NSInteger xSectionNum;
@property (nonatomic, assign) NSInteger ySectionNum;
/// X、Y轴默认间隔
@property (nonatomic, assign) CGFloat xDistance;
@property (nonatomic, assign) CGFloat yDistance;
@property (assign, nonatomic) CGFloat marKWidth ;

@property (nonatomic, assign) CGFloat maxXValue;
@property (nonatomic, assign) CGFloat maxYValue;
@property (assign, nonatomic,getter=isAnimated) BOOL  animated;
@property (assign, nonatomic) NSTimeInterval  timeInterval;

- (instancetype)initWithFrame:(CGRect)frame withData:(NSArray*)items;

// 坐标转换
- (CGFloat)getFrameX:(CGFloat)x;
- (CGFloat)getFrameY:(CGFloat)y;

@end
